Semiconductor devices such as a DRAM have an ODT function that makes an output buffer function as a terminating resistor. In recent years, there is a case where a transistor with a low threshold is used in a circuit in a preceding stage of an output buffer to increase the speed of a data path to the output buffer. Therefore, when such a semiconductor device performs a non-target ODT operation for making the output buffer function as a terminating resistor while the semiconductor device is in a non-selected state, there is a problem that a leak current is increased while the semiconductor device is in a non-selected state.